home *** CD-ROM | disk | FTP | other *** search
Wrap
<HTML> <HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> <TITLE>Acorn TimeCode Programmer's Guide</TITLE> <META NAME="GENERATOR" CONTENT="Internet Assistant for Microsoft Word 2.04z"> </HEAD> <BODY BGCOLOR="#ffffff"> <A HREF="USERGUIDE"><IMG SRC="pics/PREV" HEIGHT="28" WIDTH="96" BORDER="0"></A> <A HREF="FRONT"><IMG SRC="pics/FRONT" HEIGHT="28" WIDTH="96" BORDER="0"></A> <A HREF="CONTENTS"><IMG SRC="pics/CONTS" HEIGHT="28" WIDTH="96" BORDER="0"></A> <P> <H1>2. Acorn TimeCode Programmer's Guide <A NAME="Top"></A><A HREF="Prm.HTM#Top" ></A> </H1> <HR> <P> <FONT SIZE=3>Please refer to <A HREF="#Data">Data Formats</A> for an explanation of the data structures described as register parameters in this section. </FONT> <H1>Programmer's <A NAME="Interface">Interface</A> </H1> <H2><A NAME="TimeShareV">TimeShareV</A> </H2> <P> <FONT SIZE=3>TimeShareV is vector number &27. </FONT> <H3>TimeShareV entry for a recurrent schedule </H3> <P> <FONT SIZE=3>R0 = b31:b8 flags, b7:b0 reason code (reason code = 0) <BR> R1 = new time data word </FONT> <P> <FONT SIZE=3>Any clients interested in this call should use their interrupt schedule handle as a pointer to a word which they check for bit 30 being set. If it is, this indicates that this client is one of those who requested a vector call at this time. </FONT> <P> <FONT SIZE=3>Always pass this vector on. </FONT> <H3>TimeShareV entry for time modified </H3> <P> <FONT SIZE=3>R0 = b31:b8 flags, b7:b0 reason code (reason code = 1) <BR> R1 = number of requesters of this call <BR>R2 = new time data word </FONT> <P> <FONT SIZE=3>Each client should decrement R1. When R1 reaches 0 the call should be claimed. </FONT> <H2><A NAME="Messages">Wimp Messages</A> </H2> <P> <FONT SIZE=3>The WimpMessage number is the same as the SWI base, i.e. &4B540. </FONT> <H3>WimpMessage_TimeShare </H3> <P> <FONT SIZE=3>block <BR> +16 Message number (TimeShare_SWIBase) <BR> +20 subreason </FONT> <H4>Subreason 0 - TimeShare system component dying/starting </H4> <P> <FONT SIZE=3>+20 0 <BR> +24 flags (as R0 of service) <BR> +28 Clock/Clock Transmitter number, or 0 </FONT> <P> <FONT SIZE=3>(This is sent by the TimeShare module upon receipt of the service call, or with foreknowledge of its own death, to inform any applications about the change in system status. Note that TimeShare will not be an active wimp task - so this message will be sent as an unrecorded broadcast. You should not acknowledge the message, since this would stop any other interested clients receiving it). </FONT> <P> <FONT SIZE=3>Any programs which receive this call, and have been using the facility provided by TimeShare_ReadTimeAddress, should call TimeShare_Deregister to acknowledge that they will not read memory directly any more. </FONT> <P> <FONT SIZE=3>TimeShare will only die if it has no outstanding clients of the time data word's address once this wimp message and the service call have been sent. </FONT> <H4>Subreason 1 - Clock(Transmitter)Control SWI called by application </H4> <P> <FONT SIZE=3>+20 1 <BR> +24 SWI number (_ClockControl or _ClockTransmitterControl) <BR> +28 R0 of SWI <BR> +32 R2 of SWI <BR> +36 R3 of SWI (or 0 if R3 not used) </FONT> <P> <FONT SIZE=3>This message should be broadcast by any application (or module code) after calling SWI _ClockControl or SWI _ClockTransmitterControl successfully to change the timecode system configuration (if the SWI call fails due to an error then the message should not be sent). Note that it is <B>not</B> automatically generated by the TimeShare module. </FONT> <P> <FONT SIZE=3>This message is intended to allow applications which show the status of the system (e.g. !TimeShare) to update their displays - they may either take the information in the message and act on it directly, or use the message as a cue to interrogate the environment again. The message does not need to be sent for ClockControl subreason 5 - Set Clock, since any monitoring applications will see the change in the time anyway. </FONT> <H2>Wimp <A NAME="Pollword">Pollword </A></H2> <P> <FONT SIZE=3>Since it's possible that an application may want to have more than one pollword routine scheduled, the value stored in the nominated pollword to make it non-zero will be the interrupt schedule handle returned when it was scheduled. </FONT> <H2><A NAME="SWI">SWI</A> calls </H2> <P> <FONT SIZE=3>The SWI call chunk begins at &4B540, with errors in a block starting at &80DD00. </FONT> <P> <FONT SIZE=3>All SWIs are marked with b7:b0 for internal use. </FONT> <H3>TimeShare_ReadCurrentClock (TimeShare_SWIBase + &00) </H3> <TABLE> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>In</FONT></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R0=</FONT> </TD><TD VALIGN="TOP" WIDTH=473><FONT SIZE=3>b31:b8 flags - none defined, all bits reserved <BR> b7:b0 - for internal use, set to 0</FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>Out</FONT></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R0=</FONT> </TD><TD VALIGN="TOP" WIDTH=473><FONT SIZE=3>-1 for no current clock, or number of current clock source: <BR> 0 Internal <BR> 1 MIDI <BR> 2 (and above) reserved </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R1=</FONT></TD> <TD VALIGN="TOP" WIDTH=473><FONT SIZE=3>0 if no current clock, or frame rate identifier giving current input fps rate (no flag bits set) </FONT> </TD></TR> </TABLE> <P> <FONT SIZE=3> Note: This number applies to both the Clock and Clock Transmitter aspects of a given transport medium, even though both may not exist. </FONT> <P> <B><FONT SIZE=3>Errors</FONT></B><FONT SIZE=3>: A Clock or Clock Transmitter has too high an identity number </FONT> <H3>TimeShare_ReadActiveClockTransmitters (TimeShare_SWIBase + &01) </H3> <TABLE> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>In</FONT></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R0 = </FONT> </TD><TD VALIGN="TOP" WIDTH=210><FONT SIZE=3>b31:b8 flags - none defined, all bits reserved </FONT> </TD><TD VALIGN="TOP" WIDTH=262></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=210><FONT SIZE=3>b7:b0 - for internal use, set to 0 </FONT> </TD><TD VALIGN="TOP" WIDTH=262></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>Out</FONT></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R0 => </FONT> </TD><TD VALIGN="TOP" WIDTH=210><FONT SIZE=3>read-only data stucture </FONT> </TD><TD VALIGN="TOP" WIDTH=262></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=210><FONT SIZE=3>0</FONT> </TD><TD VALIGN="TOP" WIDTH=262><FONT SIZE=3>number of words following in structure </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=210><FONT SIZE=3>4</FONT> </TD><TD VALIGN="TOP" WIDTH=262><FONT SIZE=3>bit field for clock transmitters 0-31 (bit 0 = CT 0) </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=210><FONT SIZE=3>8</FONT> </TD><TD VALIGN="TOP" WIDTH=262><FONT SIZE=3>bit field for clock transmitters 32-63 (bit 0 = CT 32) etc. </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=210><FONT SIZE=3>A bit clear = inactive <BR> A bit set = active </FONT> </TD><TD VALIGN="TOP" WIDTH=262></TD></TR> </TABLE> <P> <FONT SIZE=3>This structure may only be modified by the TimeShare module. </FONT> <P> <B><FONT SIZE=3>Errors</FONT></B><FONT SIZE=3>: A Clock or Clock Transmitter has too high an identity number </FONT> <H3>TimeShare_ReadAvailableClocks (TimeShare_SWIBase + &02) </H3> <TABLE> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>In</FONT></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R0 = </FONT> </TD><TD VALIGN="TOP" WIDTH=208><FONT SIZE=3>b31:b8 flags - none defined, all bits reserved </FONT> </TD><TD VALIGN="TOP" WIDTH=265></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=208><FONT SIZE=3>b7:b0 - for internal use, set to 0 </FONT> </TD><TD VALIGN="TOP" WIDTH=265></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>Out</FONT></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R0 => </FONT> </TD><TD VALIGN="TOP" WIDTH=208><FONT SIZE=3>read-only data structure </FONT> </TD><TD VALIGN="TOP" WIDTH=265></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=208><FONT SIZE=3>0</FONT> </TD><TD VALIGN="TOP" WIDTH=265><FONT SIZE=3>number of words following in structure </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=208><FONT SIZE=3>4</FONT> </TD><TD VALIGN="TOP" WIDTH=265><FONT SIZE=3>bit field for clocks 0-31 (bit 0 = CK 0) </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=208><FONT SIZE=3>8</FONT> </TD><TD VALIGN="TOP" WIDTH=265><FONT SIZE=3>bit field for clocks 32-63 (bit 0 = CK 32) etc </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=208><FONT SIZE=3>A bit clear = not present <BR> A bit set = present </FONT> </TD><TD VALIGN="TOP" WIDTH=265></TD></TR> </TABLE> <P> <FONT SIZE=3>This structure may only be modified by the TimeShare module. </FONT> <P> <FONT SIZE=3>Errors: A Clock or Clock Transmitter has too high an identity number </FONT> <H3>TimeShare_ReadAvailableClockTransmitters (TimeShare_SWIBase + &03) </H3> <TABLE> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>In</FONT></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R0 = </FONT> </TD><TD VALIGN="TOP" WIDTH=208><FONT SIZE=3>b31:b8 flags - none defined, all bits reserved </FONT> </TD><TD VALIGN="TOP" WIDTH=265></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=208><FONT SIZE=3>b7:b0 - for internal use, set to 0 </FONT> </TD><TD VALIGN="TOP" WIDTH=265></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>Out</FONT></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R0 => </FONT> </TD><TD VALIGN="TOP" WIDTH=208><FONT SIZE=3>read-only data structure </FONT> </TD><TD VALIGN="TOP" WIDTH=265></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=208><FONT SIZE=3>0</FONT> </TD><TD VALIGN="TOP" WIDTH=265><FONT SIZE=3>number of words following in structure </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=208><FONT SIZE=3>4</FONT> </TD><TD VALIGN="TOP" WIDTH=265><FONT SIZE=3>bit field for clocks 0-31 (bit 0 = CT 0) </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=208><FONT SIZE=3>8</FONT> </TD><TD VALIGN="TOP" WIDTH=265><FONT SIZE=3>bit field for clocks 32-63 (bit 0 = CT 32) etc </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=208><FONT SIZE=3>A bit clear = not present</FONT> </TD><TD VALIGN="TOP" WIDTH=265></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=208><FONT SIZE=3>A bit set = present </FONT> </TD><TD VALIGN="TOP" WIDTH=265></TD></TR> </TABLE> <P> <FONT SIZE=3>This structure may only be modified by the TimeShare module. </FONT> <P> <FONT SIZE=3>Errors: none </FONT> <H3>TimeShare_InterruptSchedule (TimeShare_SWIBase + &04) </H3> <TABLE> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>In</FONT></TD><TD VALIGN="TOP" WIDTH=66><FONT SIZE=3>R0 = </FONT> </TD><TD VALIGN="TOP" WIDTH=454><FONT SIZE=3>b31: set - this is a high priority interrupt </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=66></TD><TD VALIGN="TOP" WIDTH=454><FONT SIZE=3>b30:b29 flags - reserved (internal use) </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=66></TD><TD VALIGN="TOP" WIDTH=454><FONT SIZE=3>b28: set - this is a one-shot interrupt </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=66></TD><TD VALIGN="TOP" WIDTH=454><FONT SIZE=3>b27:b8 flags - none defined, all bits reserved </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=66></TD><TD VALIGN="TOP" WIDTH=454><FONT SIZE=3>b7:b0 - for internal use, set to 0 </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=66><FONT SIZE=3>R1 = </FONT></TD> <TD VALIGN="TOP" WIDTH=454><FONT SIZE=3>0, or interrupt schedule handle to modify </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=66><FONT SIZE=3>R2 = </FONT></TD> <TD VALIGN="TOP" WIDTH=454><FONT SIZE=3>interrupt rate in 0.5uS (Timer1 ticks), minimum is 0.5555ms, maximum is &FFFFFFF. 0 cancels the schedule </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=66><FONT SIZE=3>R3 = </FONT></TD> <TD VALIGN="TOP" WIDTH=454><FONT SIZE=3>data word to associate with this schedule slot (see interrupt and timecodeV call specs for usage) </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=66><FONT SIZE=3>R4 = </FONT></TD> <TD VALIGN="TOP" WIDTH=454><FONT SIZE=3>address to call </FONT></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>Out</FONT></TD><TD VALIGN="TOP" WIDTH=66><FONT SIZE=3>(success) </FONT> </TD><TD VALIGN="TOP" WIDTH=454></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=66><FONT SIZE=3>R1 = </FONT></TD> <TD VALIGN="TOP" WIDTH=454><FONT SIZE=3>interrupt schedule handle allocated or quoted </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=66><FONT SIZE=3>R0 </FONT></TD> <TD VALIGN="TOP" WIDTH=454><FONT SIZE=3>(b31:b8), R2 - R4 preserved </FONT> </TD></TR> </TABLE> <P> <B><FONT SIZE=3>Errors</FONT></B><FONT SIZE=3>: R0 points to error block, R1-R4 preserved </FONT> <P> <FONT SIZE=3>Invalid Interrupt Schedule Handle <BR> Outside range, or not active for modification <BR> Interrupt rate is out of range <BR> Too fast, or too slow <BR> Interrupt Schedule List Full </FONT> <P> <B><FONT SIZE=3>Notes</FONT></B><FONT SIZE=3>: Calling with R1=0 and R2=0 is invalid, and will produce an Invalid Interrupt Schedule Handle error on the assumption that cancelling an interrupt is the intended result. </FONT> <P> <FONT SIZE=3>The Interrupt Schedule Handle should be regarded as a pointer to a flags word which may be interrogated under certain situations (primarily within a vector routine to check whether you are one of the clients this particular vector call is intended for). It should not be modified in any way. </FONT> <P> <FONT SIZE=3>This call can be used to change the rate of a running interrupt. </FONT> <P> <FONT SIZE=3>The high priority bit should <B>only</B> be set for interrupts which are to be used to update the TimeShare time data word (i.e. Clocks). </FONT> <P> <FONT SIZE=3>This bit is used by the interrupt scheduler to ensure that when two or more scheduled events occur together the most important one gets called first (e.g. updating the time data word before other interrupts to send it). </FONT> <P> <FONT SIZE=3>A one-shot interrupt will trigger once, after the interval specified as the interrupt rate and then to deactivate itself. There is no need to cancel a one-shot interrupt - the cancellation is automatic when it triggers. </FONT> <H3>TimeShare_PollWordSchedule (TimeShare_SWIBase + &05) </H3> <TABLE> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>In</FONT></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R0 = </FONT> </TD><TD VALIGN="TOP" WIDTH=473><FONT SIZE=3>b31:b8 flags - none defined, all bits reserved </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=473><FONT SIZE=3>b7:b0 - for internal use, set to 0 </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R1: </FONT></TD> <TD VALIGN="TOP" WIDTH=473><FONT SIZE=3>0, or interrupt schedule handle to modify </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R2: </FONT></TD> <TD VALIGN="TOP" WIDTH=473><FONT SIZE=3>interrupt rate in 0.5uS (Timer 1 ticks), limits as above </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R3: </FONT></TD> <TD VALIGN="TOP" WIDTH=473><FONT SIZE=3>address of pollword </FONT></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>Out</FONT></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R1: </FONT> </TD><TD VALIGN="TOP" WIDTH=473><FONT SIZE=3>interrupt handle schedule allocated or preserved </FONT> </TD></TR> </TABLE> <P> <B><FONT SIZE=3>Notes</FONT></B><FONT SIZE=3>:Errors and notes as above </FONT> <H3>TimeShare_TimeShareVSchedule (TimeShare_SWIBase + &06) </H3> <P> <FONT SIZE=3>(To schedule a recurrent call) </FONT> <TABLE> <TR><TD VALIGN="TOP" WIDTH=83><FONT SIZE=3>In</FONT></TD><TD VALIGN="TOP" WIDTH=44><FONT SIZE=3>R0 = </FONT> </TD><TD VALIGN="TOP" WIDTH=438><FONT SIZE=3>b31:b8 flags - none defined, all bits reserved </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=83></TD><TD VALIGN="TOP" WIDTH=44></TD><TD VALIGN="TOP" WIDTH=438><FONT SIZE=3>b7:b0 - for internal use, set to 0 </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=83></TD><TD VALIGN="TOP" WIDTH=44><FONT SIZE=3>R1: </FONT></TD> <TD VALIGN="TOP" WIDTH=438><FONT SIZE=3>0, or interrupt schedule handle to modify </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=83></TD><TD VALIGN="TOP" WIDTH=44><FONT SIZE=3>R2: </FONT></TD> <TD VALIGN="TOP" WIDTH=438><FONT SIZE=3>interrupt rate in 0.5uS (Timer 1 ticks), limits as above </FONT> </TD></TR> </TABLE> <P> <FONT SIZE=3>(To request a TimeShareV call on each update) </FONT> <TABLE> <TR><TD VALIGN="TOP" WIDTH=83><FONT SIZE=3>In</FONT></TD><TD VALIGN="TOP" WIDTH=44><FONT SIZE=3>R1: </FONT> </TD><TD VALIGN="TOP" WIDTH=438><FONT SIZE=3>-1 </FONT></TD></TR> <TR><TD VALIGN="TOP" WIDTH=83></TD><TD VALIGN="TOP" WIDTH=44><FONT SIZE=3>R2: </FONT></TD> <TD VALIGN="TOP" WIDTH=438><FONT SIZE=3>-1 to request, 0 to remove request</FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=83><FONT SIZE=3>Out <BR> (recurrent call)</FONT> </TD><TD VALIGN="TOP" WIDTH=44>R1: </TD><TD VALIGN="TOP" WIDTH=438><FONT SIZE=3>interrupt handle schedule allocated or preserved </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=83><FONT SIZE=3>(each update)</FONT></TD><TD VALIGN="TOP" WIDTH=44><FONT SIZE=3> R1:</FONT> </TD><TD VALIGN="TOP" WIDTH=438><FONT SIZE=3>number of requests currently made</FONT> </TD></TR> </TABLE> <P> <FONT SIZE=3> </FONT> <P> <B><FONT SIZE=3>Notes</FONT></B><FONT SIZE=3>: The call on each update facility does not provide individual identification of the originator since one call to TimeShareV is made for all requests. </FONT> <P> <FONT SIZE=3>Similarly, multiple recurrent schedules firing at the same time will also result in only one call - vector claimants should use their interrupt schedule handle as a pointer to a flags word to check to see whether bit 30 is set. </FONT> <H3>TimeShare_ClockTransmitterControl (TimeShare_SWIBase + &07) </H3> <FONT SIZE=3> <TABLE> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>In</FONT></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R0 = </FONT> </TD><TD VALIGN="TOP" WIDTH=473><FONT SIZE=3>b31:b8 flags - none defined, all bits reserved </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=473><FONT SIZE=3>b7:b0 - for internal use, set to 0 </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R2: </FONT></TD> <TD VALIGN="TOP" WIDTH=473><FONT SIZE=3>Frame rate identifier, or 0 to disable, or -1 to read current frame rate</FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R3: </FONT></TD> <TD VALIGN="TOP" WIDTH=473><FONT SIZE=3>Clock Transmitter number </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>Out</FONT></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R2: </FONT> </TD><TD VALIGN="TOP" WIDTH=473><FONT SIZE=3>returns frame rate identifier if R2=-1 on entry, otherwise all registers preserved unless an error is returned.</FONT> </TD></TR> </TABLE> <P> <B><FONT SIZE=3>Errors</FONT></B><FONT SIZE=3>: Clock Transmitter not present <BR> Clock Transmitter does not support this frame rate <BR> Clock Transmitter was not active </FONT> <P> <B><FONT SIZE=3>Notes</FONT></B><FONT SIZE=3>: A frame rate identifier is: </FONT> <TABLE> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>bit31: </FONT></TD><TD VALIGN="TOP" WIDTH=482><FONT SIZE=3>set: drop frame </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>bit30: </FONT></TD><TD VALIGN="TOP" WIDTH=482><FONT SIZE=3>set: this is lowest frame rate possible </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>bit29: </FONT></TD><TD VALIGN="TOP" WIDTH=482><FONT SIZE=3>set: this is highest frame rate possible </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>bit28: </FONT></TD><TD VALIGN="TOP" WIDTH=482><FONT SIZE=3>set: this is not a rate, but fully variable from 0.5 to 1800fps </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>bit27:</FONT></TD><TD VALIGN="TOP" WIDTH=482><FONT SIZE=3>count down (Internal clock only) </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>bit26: </FONT></TD><TD VALIGN="TOP" WIDTH=482><FONT SIZE=3>Add 0.97fps (for 29.97fps) </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>bit25-bit11: </FONT></TD><TD VALIGN="TOP" WIDTH=482><FONT SIZE=3>reserved, set to 0 </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>bit10-bit1: </FONT></TD><TD VALIGN="TOP" WIDTH=482><FONT SIZE=3>frame rate, max 1800, min 0.5 (with bit 0 set) </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>bit0 : </FONT></TD><TD VALIGN="TOP" WIDTH=482><FONT SIZE=3>set: add 0.5 fps</FONT> </TD></TR> </TABLE> <P> <FONT SIZE=3>However, bits 30,29,28 may not be set when setting a frame rate. </FONT> <P> <FONT SIZE=3>This SWI may be used to enable, and disable a Clock Transmitter, and to read or change the frame rate of a Clock Transmitter. </FONT> <H3>TimeShare_ClockControl (TimeShare_SWIBase+&08) </H3> <TABLE> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>In:</FONT></TD><TD VALIGN="TOP" WIDTH=38><FONT SIZE=3>R0: </FONT> </TD><TD VALIGN="TOP" WIDTH=169><FONT SIZE=3>b31:b16 flags, all 0 and reserved </FONT> </TD><TD VALIGN="TOP" WIDTH=169></TD><TD VALIGN="TOP" WIDTH=169></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=38></TD><TD VALIGN="TOP" WIDTH=169><FONT SIZE=3>b15:b8 action </FONT> </TD><TD VALIGN="TOP" WIDTH=169><FONT SIZE=3>0: Select (automatically deselects previous) </FONT> </TD><TD VALIGN="TOP" WIDTH=169></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=38></TD><TD VALIGN="TOP" WIDTH=169></TD><TD VALIGN="TOP" WIDTH=169><FONT SIZE=3>1: Deselect </FONT></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=38></TD><TD VALIGN="TOP" WIDTH=169></TD><TD VALIGN="TOP" WIDTH=169><FONT SIZE=3>2: Set frame rate R3 = Frame rate identifier </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=38></TD><TD VALIGN="TOP" WIDTH=169></TD><TD VALIGN="TOP" WIDTH=169><FONT SIZE=3>3: Start clock </FONT></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=38></TD><TD VALIGN="TOP" WIDTH=169></TD><TD VALIGN="TOP" WIDTH=169><FONT SIZE=3>4: Stop clock </FONT></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=38></TD><TD VALIGN="TOP" WIDTH=169></TD><TD VALIGN="TOP" WIDTH=169><FONT SIZE=3>5: Set clock R3 = Time data word </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=38></TD><TD VALIGN="TOP" WIDTH=169></TD><TD VALIGN="TOP" WIDTH=169><FONT SIZE=3>6: Set speed (internal clock only) R3 = Frame rate identifier </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=38><FONT SIZE=3>R2: </FONT></TD> <TD VALIGN="TOP" WIDTH=169><FONT SIZE=3>Clock number </FONT></TD><TD VALIGN="TOP" WIDTH=169> </TD><TD VALIGN="TOP" WIDTH=169></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=38><FONT SIZE=3>R3: </FONT></TD> <TD VALIGN="TOP" WIDTH=169><FONT SIZE=3>may be used, see R0 </FONT></TD><TD VALIGN="TOP" WIDTH=169> </TD><TD VALIGN="TOP" WIDTH=169></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>Out</FONT></TD><TD VALIGN="TOP" WIDTH=38></TD> <TD VALIGN="TOP" WIDTH=169><FONT SIZE=3>all preserved unless an error occurs</FONT> </TD><TD VALIGN="TOP" WIDTH=169></TD><TD VALIGN="TOP" WIDTH=169></TD></TR> </TABLE> <P> <B><FONT SIZE=3>Errors</FONT></B><FONT SIZE=3>: Clock not present <BR> This is an external Clock which may not be adjusted in this manner <BR> Undefined Action number </FONT> <P> <B><FONT SIZE=3>Notes</FONT></B><FONT SIZE=3>: The automatic deselection when a select action is performed is achieved for the caller by the TimeShare module issuing a deselect action on the caller's behalf before acting on the select action. </FONT> <P> <FONT SIZE=3>Reason 6 may be used to set the Internal Clock to run at one frame rate, but to return time in another - e.g. setting a frame rate of 30fps, and setting a speed of 90 fps would result in 30fps running at 3 x real time. It is also possible to set the direction for time to run using bit 27 of the frame rate identifier. Setting a new frame rate with reason 3 cancels any effects imposed by reason 6 (i.e. the new frame rate will be running forwards at real time when the clock runs). </FONT> <P> <FONT SIZE=3>At first glance it may seem a little strange to use a Clock control interface to alter the time in the TimeShare system. This is done for several reasons. </FONT> <OL> <LI>The individual Clock module is in the best place to know whether it can support adjustments to the time <LI>Most Clock modules have internal state to maintain, and need to know about a change </OL> <TABLE> <TR><TD VALIGN="TOP" WIDTH=102><FONT SIZE=3>Time data word: </FONT></TD><TD VALIGN="TOP" WIDTH=85><FONT SIZE=3>Bits 31-26</FONT> </TD><TD VALIGN="TOP" WIDTH=66></TD><TD VALIGN="TOP" WIDTH=271><FONT SIZE=3>Hours (0-23)</FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=102></TD><TD VALIGN="TOP" WIDTH=85><FONT SIZE=3>Bits 25-20</FONT> </TD><TD VALIGN="TOP" WIDTH=66><FONT SIZE=3> </FONT></TD><TD VALIGN="TOP" WIDTH=271><FONT SIZE=3>Minutes (0-59)</FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=102></TD><TD VALIGN="TOP" WIDTH=85><FONT SIZE=3>Bits 19-14</FONT> </TD><TD VALIGN="TOP" WIDTH=66><FONT SIZE=3> </FONT></TD><TD VALIGN="TOP" WIDTH=271><FONT SIZE=3>Seconds (0-59)</FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=102></TD><TD VALIGN="TOP" WIDTH=85><FONT SIZE=3>Bits 13-3</FONT> </TD><TD VALIGN="TOP" WIDTH=66></TD><TD VALIGN="TOP" WIDTH=271><FONT SIZE=3>Frame count (0-1799) </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=102></TD><TD VALIGN="TOP" WIDTH=85><FONT SIZE=3>Bits 2</FONT> </TD><TD VALIGN="TOP" WIDTH=66></TD><TD VALIGN="TOP" WIDTH=271><FONT SIZE=3>Expanded format bit (set to 0 at present) </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=102></TD><TD VALIGN="TOP" WIDTH=85><FONT SIZE=3>Bits 1-0</FONT> </TD><TD VALIGN="TOP" WIDTH=66></TD><TD VALIGN="TOP" WIDTH=271><FONT SIZE=3>Status indication </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=102></TD><TD VALIGN="TOP" WIDTH=85></TD><TD VALIGN="TOP" WIDTH=66><FONT SIZE=3>Bit 1 0 </FONT> </TD><TD VALIGN="TOP" WIDTH=271></TD></TR> <TR><TD VALIGN="TOP" WIDTH=102></TD><TD VALIGN="TOP" WIDTH=85></TD><TD VALIGN="TOP" WIDTH=66><FONT SIZE=3>Bit 0 0</FONT> </TD><TD VALIGN="TOP" WIDTH=271><FONT SIZE=3>Clock incrementing normally </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=102></TD><TD VALIGN="TOP" WIDTH=85></TD><TD VALIGN="TOP" WIDTH=66><FONT SIZE=3>Bit 0 1</FONT> </TD><TD VALIGN="TOP" WIDTH=271><FONT SIZE=3>Clock decrementing normally </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=102></TD><TD VALIGN="TOP" WIDTH=85></TD><TD VALIGN="TOP" WIDTH=66><FONT SIZE=3>Bit 1 0</FONT> </TD><TD VALIGN="TOP" WIDTH=271><FONT SIZE=3>New time </FONT></TD></TR> <TR><TD VALIGN="TOP" WIDTH=102></TD><TD VALIGN="TOP" WIDTH=85></TD><TD VALIGN="TOP" WIDTH=66><FONT SIZE=3>Bit 1 1</FONT> </TD><TD VALIGN="TOP" WIDTH=271><FONT SIZE=3>Clock Stopped (and may be a New time) </FONT> </TD></TR> </TABLE> <P> <FONT SIZE=3>When used here bits 1 and 0 should not be set. </FONT> <H3>TimeShare_ReadTimeAddress (TimeShare_SWIBase+&09) </H3> <TABLE> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>In</FONT></TD><TD VALIGN="TOP" WIDTH=38><FONT SIZE=3>R0 = </FONT> </TD><TD VALIGN="TOP" WIDTH=444><FONT SIZE=3>b31:b8 flags - none defined, all bits reserved </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=38></TD><TD VALIGN="TOP" WIDTH=444><FONT SIZE=3>b7:b0 - for internal use, set to 0 </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>Out</FONT></TD><TD VALIGN="TOP" WIDTH=38><FONT SIZE=3>R0: </FONT> </TD><TD VALIGN="TOP" WIDTH=444><FONT SIZE=3>preserved </FONT></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=38><FONT SIZE=3>R1 -> </FONT> </TD><TD VALIGN="TOP" WIDTH=444><FONT SIZE=3>Time data word in TimeShare module </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=38><FONT SIZE=3>R2: </FONT></TD> <TD VALIGN="TOP" WIDTH=444><FONT SIZE=3>number of registered clients </FONT> </TD></TR> </TABLE> <P> <B><FONT SIZE=3>Notes</FONT></B><FONT SIZE=3>: This interface is provided to allow the fastest possible access for reading the time data word. It must not be modified. </FONT> <P> <FONT SIZE=3>The TimeShare module keeps count of the number of clients who have called this SWI for the address. When a client no longer wants to make use of the memory address it should call TimeShare_Deregister. </FONT> <P> <FONT SIZE=3>The TimeShare module will refuse to quit whilst this count is non-zero. </FONT> <H3>TimeShare_ReadTime (TimeShare_SWIBase+&0A) </H3> <TABLE> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>In</FONT></TD><TD VALIGN="TOP" WIDTH=38><FONT SIZE=3>R0 = </FONT> </TD><TD VALIGN="TOP" WIDTH=444><FONT SIZE=3>b31:b8 flags - none defined, all bits reserved </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=38></TD><TD VALIGN="TOP" WIDTH=444><FONT SIZE=3>b7:b0 - for internal use, set to 0 </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=38><FONT SIZE=3>R1: </FONT></TD> <TD VALIGN="TOP" WIDTH=444><FONT SIZE=3>0, or frame rate identifier </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>Out</FONT></TD><TD VALIGN="TOP" WIDTH=38><FONT SIZE=3>R2: </FONT> </TD><TD VALIGN="TOP" WIDTH=444><FONT SIZE=3>Time data word, with fps converted if R1<>0 </FONT> </TD></TR> </TABLE> <P> <B><FONT SIZE=3>Errors</FONT></B><FONT SIZE=3>: Invalid frame rate </FONT> <P> <B><FONT SIZE=3>Notes</FONT></B><FONT SIZE=3>:This may be used to either read the time data word, with no alteration or to read it after conversion to a specified frame rate. Obviously the call will return more quickly if no conversion is specified. </FONT> <H3>TimeShare_ConvertTimeToSpecified (TimeShare_SWIBase+&0B) </H3> <TABLE> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>In</FONT></TD><TD VALIGN="TOP" WIDTH=38><FONT SIZE=3>R0 = </FONT> </TD><TD VALIGN="TOP" WIDTH=444><FONT SIZE=3>b31:b8 flags - none defined, all bits reserved </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=38></TD><TD VALIGN="TOP" WIDTH=444><FONT SIZE=3>b7:b0 - for internal use, set to 0 </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=38><FONT SIZE=3>R1: </FONT></TD> <TD VALIGN="TOP" WIDTH=444><FONT SIZE=3>frame rate identifier </FONT></TD> </TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=38><FONT SIZE=3>R2: </FONT></TD> <TD VALIGN="TOP" WIDTH=444><FONT SIZE=3>time data word in 1800fps </FONT></TD> </TR> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>Out</FONT></TD><TD VALIGN="TOP" WIDTH=38><FONT SIZE=3>R2: </FONT> </TD><TD VALIGN="TOP" WIDTH=444><FONT SIZE=3>time data word, with fps converted to frame rate from R1 </FONT> </TD></TR> </TABLE> <P> <B><FONT SIZE=3>Errors</FONT></B><FONT SIZE=3>: Invalid frame rate </FONT> <P> <B><FONT SIZE=3>Notes</FONT></B><FONT SIZE=3>: This call is used to convert from internal 1800fps time to a specified rate. This call will be used under interrupts, and is therefore re-entrant. </FONT> <H3>TimeShare_ConvertTimeFromSpecified (TimeShare_SWIBase+&0C) </H3> <TABLE> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>In</FONT></TD><TD VALIGN="TOP" WIDTH=38><FONT SIZE=3>R0 = </FONT> </TD><TD VALIGN="TOP" WIDTH=444><FONT SIZE=3>b31:b8 flags - none defined, all bits reserved </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=38></TD><TD VALIGN="TOP" WIDTH=444><FONT SIZE=3>b7:b0 - for internal use, set to 0 </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=38><FONT SIZE=3>R1: </FONT></TD> <TD VALIGN="TOP" WIDTH=444><FONT SIZE=3>frame rate identifier </FONT></TD> </TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=38><FONT SIZE=3>R2: </FONT></TD> <TD VALIGN="TOP" WIDTH=444><FONT SIZE=3>time data word, with fps in frame rate from R1 </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>Out</FONT></TD><TD VALIGN="TOP" WIDTH=38><FONT SIZE=3>R2: </FONT> </TD><TD VALIGN="TOP" WIDTH=444><FONT SIZE=3>time data word in 1800fps </FONT> </TD></TR> </TABLE> <P> <B><FONT SIZE=3>Errors</FONT></B><FONT SIZE=3>: Invalid frame rate </FONT> <P> <B><FONT SIZE=3>Notes</FONT></B><FONT SIZE=3>: This call is used to convert from a specified rate to internal 1800fps representation.This call will be used under interrupts, and is therefore re-entrant. </FONT> <H3>TimeShare_ReadClockInformation (TimeShare_SWIBase+&0D) </H3> <TABLE> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>In</FONT></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R0 = </FONT> </TD><TD VALIGN="TOP" WIDTH=435><FONT SIZE=3>b31 - internal use </FONT></TD> </TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=435><FONT SIZE=3>b30:b8 flags - none defined, all bits reserved </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=435><FONT SIZE=3>b7:b0 - for internal use, set to 0 </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R2: </FONT></TD> <TD VALIGN="TOP" WIDTH=435><FONT SIZE=3>Clock number </FONT></TD></TR> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>Out</FONT></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R3 -></FONT> </TD><TD VALIGN="TOP" WIDTH=435><FONT SIZE=3>information structure </FONT> </TD></TR> </TABLE> <P> <B><FONT SIZE=3>Errors</FONT></B><FONT SIZE=3>: Clock Not Present </FONT> <P> <B><FONT SIZE=3>Notes</FONT></B><FONT SIZE=3>: Clock/Clock Transmitter Information Structure: </FONT> <P> <FONT SIZE=3>0 Pointer to non word-aligned ascii name, zero terminated <BR> 4 Number of frame rate identifiers following <BR> 8 Frame rate identifier etc </FONT> <P> <FONT SIZE=3>(In this instance, a frame rate identifier may have the various flag bits set that are not allowed when specifying a frame rate, so allowing information about a range of settings to be expressed economically.) </FONT> <P> <FONT SIZE=3>For Clocks where the rate may not be changed by the computer (i.e. an external clock) the number of frame rate identifiers may be returned as zero. </FONT> <H3>TimeShare_ReadClockTransmitterInformation (TimeShare_SWIBase+&0E) </H3> <TABLE> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>In</FONT></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R0 = </FONT> </TD><TD VALIGN="TOP" WIDTH=435><FONT SIZE=3>b31 internal use </FONT></TD> </TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=435><FONT SIZE=3>b30:b8 flags - none defined, all bits reserved </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=435><FONT SIZE=3>b7:b0 - for internal use, set to 0 </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R2: </FONT></TD> <TD VALIGN="TOP" WIDTH=435><FONT SIZE=3>Clock Transmitter number </FONT></TD> </TR> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>Out</FONT></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R3 -> </FONT> </TD><TD VALIGN="TOP" WIDTH=435><FONT SIZE=3>information structure</FONT></TD> </TR> </TABLE> <P> <B><FONT SIZE=3> Errors</FONT></B><FONT SIZE=3>: Clock Transmitter Not Present </FONT> <P> <B><FONT SIZE=3>Notes</FONT></B><FONT SIZE=3>: Clock/Clock Transmitter Information Structure </FONT> <P> <FONT SIZE=3>0 Pointer to non word-aligned ascii name, zero terminated <BR> 4 Number of frame rate identifiers following <BR> 8 Frame rate identifier etc </FONT> <P> <FONT SIZE=3>(In this instance, a frame rate identifier may have the various flag bits set that are not allowed when specifying a frame rate, so allowing information about a range of settings to be expressed economically.) </FONT> <H3>TimeShare_InterpretFrameRateIdentifier (TimeShare_SWIBase+&0F) </H3> <TABLE> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>In</FONT></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R0 = </FONT> </TD><TD VALIGN="TOP" WIDTH=498><FONT SIZE=3>b31:b8 flags - none defined, all bits reserved </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=498><FONT SIZE=3>b7:b0 - for internal use, set to 0 </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R1: </FONT></TD> <TD VALIGN="TOP" WIDTH=498><FONT SIZE=3>frame rate identifier </FONT></TD> </TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R2 -> </FONT> </TD><TD VALIGN="TOP" WIDTH=498><FONT SIZE=3>memory to put interpreted structure </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R3: </FONT></TD> <TD VALIGN="TOP" WIDTH=498><FONT SIZE=3>size of memory, or 0 to calculate size </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>Out</FONT></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R3: </FONT> </TD><TD VALIGN="TOP" WIDTH=498><FONT SIZE=3>last byte used in memory if R3 <> 0 on entry </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R3: </FONT></TD> <TD VALIGN="TOP" WIDTH=498><FONT SIZE=3>number of bytes required if R3=0 </FONT> </TD></TR> </TABLE> <P> <B><FONT SIZE=3>Errors</FONT></B><FONT SIZE=3>: Not enough space provided Illegal Frame Rate Identifier </FONT> <P> <B><FONT SIZE=3>Notes</FONT></B><FONT SIZE=3>: This call has two modes of usage: </FONT> <P> <FONT SIZE=3>R2 - irrelevant and R3 = 0: </FONT> <P> <FONT SIZE=3>R3 will be returned with the size of memory needed. No data is stored anywhere. </FONT> <P> <FONT SIZE=3>R2 -> memory and R3 > 0: </FONT> <P> <FONT SIZE=3>data will be stored at R2 and R3 set to the last byte used. </FONT> <P> <FONT SIZE=3>This call is used to provided a localised string which may be used in building a menu or within a dialogue box. </FONT> <P> <FONT SIZE=3>Application developers should be cautious about simply calling this SWI for each frame rate identifier returned and then building a menu - this would be perfectly acceptable for three or four discrete frame rates, but not a range. </FONT> <P> <FONT SIZE=3>The strings returned will of course depend upon the locale in effect, but English ones could be: </FONT> <P> <FONT SIZE=3>24 fps <BR> 12.5 fps <BR> 29.97 fps <BR> 30 fps dropframe <BR> From 20 fps to 1800 fps <BR> From 0.5 fps to 1800 fps </FONT> <P> <FONT SIZE=3>As can be seen, the last three are of little use as potential menu selections. Instead, the application should provide a dialogue box allowing adjustment in 0.5fps between the low and high bounds. </FONT> <H3>TimeShare_Deregister (TimeShare_SWIBase+&10) </H3> <TABLE> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>In</FONT></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R0 = </FONT> </TD><TD VALIGN="TOP" WIDTH=498><FONT SIZE=3>b31:b8 flags - none defined, all bits reserved </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45></TD><TD VALIGN="TOP" WIDTH=47></TD><TD VALIGN="TOP" WIDTH=498><FONT SIZE=3>b7:b0 - for internal use, set to 0 </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=45><FONT SIZE=3>Out</FONT></TD><TD VALIGN="TOP" WIDTH=47><FONT SIZE=3>R0: </FONT> </TD><TD VALIGN="TOP" WIDTH=498><FONT SIZE=3>updated count of clients of TimeShare_ReadTimeAddress </FONT> </TD></TR> </TABLE> <P> <B><FONT SIZE=3>Notes</FONT></B><FONT SIZE=3>: This SWI is used to tell the TimeShare module that a client which has previously read the address of the time data word will no longer need to use it. </FONT> <P> <FONT SIZE=3>The TimeShare module will refuse to die whilst the count of clients is non-zero, so it is important that this SWI is used! </FONT> <A NAME="mitter"><BR></A> <H2><A NAME="Internal">Internal</A> Clock Transmitter </H2> <P> <FONT SIZE=3>Since the functionality of the Internal Clock Transmitter is actually presented to the user by two specialised SWIs, it does not appear as a standard Clock Transmitter when all available Clock Transmitters are interrogated. </FONT></A> <H2><A NAME="Errors">Error messages</A> </H2> <TABLE> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>0x80dd00</FONT></TD><TD VALIGN="TOP" WIDTH=104><FONT SIZE=3>ErrSchFull:</FONT> </TD><TD VALIGN="TOP" WIDTH=207><FONT SIZE=3>Interrupt schedule list is full </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>0x80dd01</FONT></TD><TD VALIGN="TOP" WIDTH=104><FONT SIZE=3>ErrBadHan:</FONT> </TD><TD VALIGN="TOP" WIDTH=207><FONT SIZE=3>Bad interrupt schedule handle </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>0x80dd02</FONT></TD><TD VALIGN="TOP" WIDTH=104><FONT SIZE=3>ErrBadInt:</FONT> </TD><TD VALIGN="TOP" WIDTH=207><FONT SIZE=3>Bad interrupt interval </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>0x80dd03</FONT></TD><TD VALIGN="TOP" WIDTH=104><FONT SIZE=3>ErrBadFrame:</FONT> </TD><TD VALIGN="TOP" WIDTH=207><FONT SIZE=3>Invalid frame rate </FONT></TD> </TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>0x80dd04</FONT></TD><TD VALIGN="TOP" WIDTH=104><FONT SIZE=3>ErrWrongSize:</FONT> </TD><TD VALIGN="TOP" WIDTH=207><FONT SIZE=3>Not enough space provided </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>0x80dd05</FONT></TD><TD VALIGN="TOP" WIDTH=104><FONT SIZE=3>ErrTooMany:</FONT> </TD><TD VALIGN="TOP" WIDTH=207><FONT SIZE=3>A Clock or Clock Transmitter has too high an identity number </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>0x80dd06</FONT></TD><TD VALIGN="TOP" WIDTH=104><FONT SIZE=3>ErrCNotFound:</FONT> </TD><TD VALIGN="TOP" WIDTH=207><FONT SIZE=3>The Clock or Clock Transmitter specified is not available </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>0x80dd07</FONT></TD><TD VALIGN="TOP" WIDTH=104><FONT SIZE=3>ErrBadCC:</FONT> </TD><TD VALIGN="TOP" WIDTH=207><FONT SIZE=3>Undefined action number </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>0x80dd08</FONT></TD><TD VALIGN="TOP" WIDTH=104><FONT SIZE=3>ErrIllCC:</FONT> </TD><TD VALIGN="TOP" WIDTH=207><FONT SIZE=3>This is an external clock which may not be adjusted in this manner </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>0x80dd09</FONT></TD><TD VALIGN="TOP" WIDTH=104><FONT SIZE=3>ErrNotActive:</FONT> </TD><TD VALIGN="TOP" WIDTH=207><FONT SIZE=3>This Clock Transmitter is not active </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>0x80dd0a</FONT></TD><TD VALIGN="TOP" WIDTH=104><FONT SIZE=3>ErrStillInUse:</FONT> </TD><TD VALIGN="TOP" WIDTH=207><FONT SIZE=3>The module cannot die until all clients have deregistered </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>0x80dd0b</FONT></TD><TD VALIGN="TOP" WIDTH=104><FONT SIZE=3>ErrWrongClock:</FONT> </TD><TD VALIGN="TOP" WIDTH=207><FONT SIZE=3>You must select this Clock first </FONT> </TD></TR> </TABLE> <P> <FONT SIZE=3>Note: The localised form of these errors may still vary. </FONT> <H1>Data <A NAME="Formats">Formats</A><A NAME="Data"> </A></H1> <P> <FONT SIZE=3>The following data structures are available through the API. </FONT> <H2><A NAME="Clock">Clock</A>/Clock <A NAME="trans">Trans</A>mitter Information Structure </H2> <TABLE> <TR><TD VALIGN="TOP" WIDTH=64><FONT SIZE=3>+0 word</FONT></TD><TD VALIGN="TOP" WIDTH=397><FONT SIZE=3>Pointer to non word-aligned ascii name, zero terminated </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=64><FONT SIZE=3>+4 word</FONT></TD><TD VALIGN="TOP" WIDTH=397><FONT SIZE=3>Number of frame rate identifiers following </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=64><FONT SIZE=3>+8 word</FONT></TD><TD VALIGN="TOP" WIDTH=397><FONT SIZE=3>Frame rate identifier etc </FONT> </TD></TR> </TABLE> <P> <FONT SIZE=3>See <A HREF="#Frame" >Frame Rate Identifiers</A>. </FONT> <P> <FONT SIZE=3>The name pointer is localised - any future Clocks/Clock Transmitter which need to localise their name (as opposed to an universal name like MIDI) should use a message file of their own and look up the localised name. </FONT> <H2>Frame <A NAME="Rate">Rate</A> Identifiers<A NAME="Frame"> </A></H2> <P> <FONT SIZE=3>This is a single word, combining numerical information about a frame rate with other information to aid expressing a range of values. </FONT> <TABLE> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>bit31: </FONT></TD><TD VALIGN="TOP" WIDTH=397><FONT SIZE=3>set: drop frame </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>bit30: </FONT></TD><TD VALIGN="TOP" WIDTH=397><FONT SIZE=3>set: this is lowest frame rate possible </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>bit29: </FONT></TD><TD VALIGN="TOP" WIDTH=397><FONT SIZE=3>set: this is highest frame rate possible </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>bit28: </FONT></TD><TD VALIGN="TOP" WIDTH=397><FONT SIZE=3>set: this is not a rate, but continuously variable from 0.5 to 1800fps </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>bit27: </FONT></TD><TD VALIGN="TOP" WIDTH=397><FONT SIZE=3>set: count down rather than (see SWI _ClockControl:6) </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>bit26: </FONT></TD><TD VALIGN="TOP" WIDTH=397><FONT SIZE=3>set: add 0.97fps (for 29.97fps) </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>bit25-bit12: </FONT></TD><TD VALIGN="TOP" WIDTH=397><FONT SIZE=3>reserved, set to 0 </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>bit11-bit1: </FONT></TD><TD VALIGN="TOP" WIDTH=397><FONT SIZE=3>frame rate, max 1800, min 0.5 (with bit 0 set) </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>bit0 : </FONT></TD><TD VALIGN="TOP" WIDTH=397><FONT SIZE=3>set: add 0.5 fps </FONT> </TD></TR> </TABLE> <P> <FONT SIZE=3>This word is also used to set a frame rate, but various flag bits may not be set. </FONT> <H2><A NAME="Time">Time</A> Data Word </H2> <P> <FONT SIZE=3>This is the internal time representation in 1800 fps. </FONT> <TABLE> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>Bits 31-26</FONT></TD><TD VALIGN="TOP" WIDTH=142><FONT SIZE=3>Hours (0-23) </FONT> </TD><TD VALIGN="TOP" WIDTH=255></TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>Bits 25-20</FONT></TD><TD VALIGN="TOP" WIDTH=142><FONT SIZE=3>Minutes (0-59) </FONT> </TD><TD VALIGN="TOP" WIDTH=255></TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>Bits 19-14</FONT></TD><TD VALIGN="TOP" WIDTH=142><FONT SIZE=3>Seconds (0-59) </FONT> </TD><TD VALIGN="TOP" WIDTH=255></TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>Bits 13-3</FONT></TD><TD VALIGN="TOP" WIDTH=142><FONT SIZE=3>Frame count (0-1799) </FONT> </TD><TD VALIGN="TOP" WIDTH=255></TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>Bit 2</FONT></TD><TD VALIGN="TOP" WIDTH=142><FONT SIZE=3>Expanded format bit (set at 0) </FONT> </TD><TD VALIGN="TOP" WIDTH=255></TD></TR> <TR><TD VALIGN="TOP" WIDTH=73><FONT SIZE=3>Bits 1-0</FONT></TD><TD VALIGN="TOP" WIDTH=142><FONT SIZE=3>Status indication </FONT> </TD><TD VALIGN="TOP" WIDTH=255></TD></TR> <TR><TD VALIGN="TOP" WIDTH=73></TD><TD VALIGN="TOP" WIDTH=142><FONT SIZE=3>Bit 0 0 <BR> Bit 0 1<BR> Bit 1 0<BR> Bit 1 1</FONT> </TD><TD VALIGN="TOP" WIDTH=255><FONT SIZE=3>Clock incrementing normally <BR> Clock decrementing normally <BR> New time <BR> Clock Stopped (and may be a New time)</FONT> </TD></TR> </TABLE> <P> <B><FONT SIZE=3>Notes</FONT></B><FONT SIZE=3>: Bit 2 is reserved for indicating the format of the time data word. While it is clear the format above is in use. Whenever it is set, some future (probably multi-word) format is in use instead - any applications which wish to act upon the structure of the time data word should check bit 2 is clear before applying their current understanding of the word's usage. </FONT> <H2>Data <A NAME="Structure">Structure</A> for Available Clocks and Available/Active Clock Transmitters </H2> <P> <FONT SIZE=3>This is an internal data structure within the TimeShare module, which other components in the TimeCode system may modify. It is also available through the API, but must not be directly modified. </FONT> <TABLE> <TR><TD VALIGN="TOP" WIDTH=54><FONT SIZE=3>+0 </FONT></TD><TD VALIGN="TOP" WIDTH=536><FONT SIZE=3>wordnumber of words following in structure </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=54><FONT SIZE=3>+4 </FONT></TD><TD VALIGN="TOP" WIDTH=536><FONT SIZE=3>wordbit field for clocks/clock transmitters 0-31 (bit 0 = CT 0) </FONT> </TD></TR> <TR><TD VALIGN="TOP" WIDTH=54><FONT SIZE=3>+8 </FONT></TD><TD VALIGN="TOP" WIDTH=536><FONT SIZE=3>wordbit field for clocks/clock transmitters 32-63 (bit 0 = CT 32) etc </FONT> </TD></TR> </TABLE> <P> <FONT SIZE=3>A bit set in the bit field indicates that the component concerned is active, or available, as appropriate. </FONT> <P> <B><FONT SIZE=3>NB</FONT></B><FONT SIZE=3>: It should be noted that nobody should make ANY assumptions about this. Future versions of the TimeShare module may well size this dynamically. </FONT> <H1><A NAME="Following">Following</A> <A NAME="Industry">Industry</A> Conventions </H1> <P> <FONT SIZE=3>Materials should start at 01:00:00:00 rather than 00:00:00:00 to allow a 'pre-roll' sequence. The convention in the film and video industry is: </FONT> <P> <B><FONT SIZE=3>hh:mm:ss:ff </FONT></B> <P> <FONT SIZE=3>00:58:00:00 black and silence <BR> 00:58:30:00 bars/tone in <BR> 00:59:30:00 bars/tone out <BR> 00:59:40:00 slate <BR> 00:59:50:00 ten second countdown <BR> 01:00:00:00 fade from black, programme start </FONT> <P> <FONT SIZE=3>For more details refer to 'Audio Production Techniques for Video' by D. M. Huber, Focal Press, ISBN 0-240-80148-2. <BR> </FONT> <P> <A HREF="USERGUIDE"><IMG SRC="pics/PREV" HEIGHT="28" WIDTH="96" BORDER="0"></A> <A HREF="FRONT"><IMG SRC="pics/FRONT" HEIGHT="28" WIDTH="96" BORDER="0"></A> <A HREF="CONTENTS"><IMG SRC="pics/CONTS" HEIGHT="28" WIDTH="96" BORDER="0"></A> </BODY> </HTML>